from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from toutiao import app, db

# 创建manager用来管理app
manager = Manager(app)

# 添加迁移管理
Migrate(app, db)

# 将迁移指令交给manager管理
manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    manager.run()

